<template>
    <div>
        <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>内容管理</el-breadcrumb-item>
      <el-breadcrumb-item>新闻管理</el-breadcrumb-item>
    </el-breadcrumb>
        <el-card>
 <el-table
    :data="tableData"
    style="width: 100%"
    :row-class-name="tableRowClassName">
    <el-table-column
      prop="date"
      label="编写日期"
      width="180">
    </el-table-column>
    <el-table-column
      prop="name"
      label="新闻主题"
      width="800">
    </el-table-column>
     <el-table-column
      prop="state"
      label="状态">
    </el-table-column>
    <el-table-column
      prop="address"
      label="操作">
    </el-table-column>
  </el-table>


        </el-card>
        
    </div>
</template>
<style lang="less" scoped>
.el-card{
margin: 5px;


}

</style>
<script>
export default {
    methods: {
      tableRowClassName({row, rowIndex}) {
        if (rowIndex === 1) {
          return 'warning-row';
        } else if (rowIndex === 3) {
          return 'success-row';
        }
        return '';
      }
    },
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          name: '中国航空运输协会2020年度公开招聘工作人员公告',
          state: '正常',
          address: '-',
        }, {
          date: '2016-05-04',
          name: '中国航协民航英语在线学习正式推出',
           state: '正常',
          address: '-'
        }]
      }
    }
  }
</script>